package com.daryl.jcu_project1_creditscoreform;

import android.os.Bundle;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.view.Menu;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.LinearLayout;

public class Loan_application12 extends Activity {
	
	/**
	 * @uml.property  name="nextPageBtn"
	 * @uml.associationEnd  
	 */
	private Button nextPageBtn;
	/**
	 * @uml.property  name="previousPageBtn"
	 * @uml.associationEnd  
	 */
	private Button previousPageBtn;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_loan_application12);
		nextPageBtn = (Button) findViewById(R.id.nextPageBtn);
		nextPageBtn.setOnClickListener(nextPage());
		previousPageBtn = (Button) findViewById(R.id.backPageBtn);
		previousPageBtn.setOnClickListener(previousPage());
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.activity_loan_application12, menu);
		return true;
	}
	
	
	public void buttonClickYes(View view){
		LinearLayout ll1 = (LinearLayout)findViewById(R.id.LifeInsuranceOptions);
		ll1.setVisibility(View.VISIBLE);

	}
	public void buttonClickNo(View view){
			LinearLayout ll1 = (LinearLayout)findViewById(R.id.LifeInsuranceOptions);
			ll1.setVisibility(View.GONE);
		
	}
	private OnClickListener nextPage() {
		final Context context = this;
		return new OnClickListener() {
			public void onClick(View v) {
				Intent intent = new Intent(context, DisplayPolicy.class);
                startActivity(intent);
				
			}
		
			};
	}
	private OnClickListener previousPage() {
		final Context context = this;
		return new OnClickListener() {
			public void onClick(View v) {
				Intent intent = new Intent(context, Loan_application11.class);
                startActivity(intent);
			}
		
			};
	}
	
	
	
	
	

	

}
